export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      // dashboard
      { path: '/', redirect: '/article/list' },
      /*article*/
      {
        path: '/article',
        icon: 'form',
        name: 'article',
        routes: [
          {
            path: '/article/list',
            name: 'list',
            component: './Article/List',
          },
          {
            path: '/article/add',
            name: 'add',
            component: './Article/Add',
          },
          {
            path: '/article/edit/:id',
            name: 'edit',
            hideInMenu: true,
            component: './Article/Edit',
          },
          {
            path: '/article/detail/:id',
            name: 'detail',
            hideInMenu: true,
            component: './Article/Detail',
          }
        ],
      },
      {
        path: '/active',
        icon: 'form',
        name: 'active',
        routes: [
          {
            path: '/active/list',
            name: 'list',
            component: './Active/List',
          },
          {
            path: '/active/add',
            name: 'add',
            component: './Active/Add',
          },
          {
            path: '/active/edit/:id',
            name: 'edit',
            hideInMenu: true,
            component: './Active/Edit',
          },
          {
            path: '/active/detail/:id',
            name: 'detail',
            hideInMenu: true,
            component: './Active/Detail',
          },
          {
            path: '/active/book/:id',
            name: 'book',
            hideInMenu: true,
            component: './Active/BookList',
          },
        ],
      },
      {
        path: '/category',
        icon: 'form',
        name: 'category',
        routes: [
          {
            path: '/category/articleList',
            name: 'articleList',
            component: './Category/ArticleList',
          },
          {
            path: '/category/activeList',
            name: 'activeList',
            component: './Category/ActiveList',
          }
        ],
      },
      {
        path: '/advert',
        icon: 'form',
        name: 'advert',
        routes: [
          {
            path: '/advert/list',
            name: 'list',
            component: './Advert/List',
          },
          {
            path: '/advert/add',
            name: 'add',
            component: './Advert/Add',
          },{
            path: '/advert/edit/:id',
            name: 'edit',
            hideInMenu: true,
            component: './Advert/Edit',
          },
          {
            path: '/advert/detail/:id',
            name: 'detail',
            hideInMenu: true,
            component: './Advert/Detail',
          }
        ],
      },
      {
        path: '/banner',
        icon: 'form',
        name: 'banner',
        routes: [
          {
            path: '/banner/list',
            name: 'list',
            component: './Banner/List',
          },
          {
            path: '/banner/add',
            name: 'add',
            component: './Banner/Add',
          },{
            path: '/banner/edit/:id',
            name: 'edit',
            hideInMenu: true,
            component: './Banner/Edit',
          },
          {
            path: '/banner/detail/:id',
            name: 'detail',
            hideInMenu: true,
            component: './Banner/Detail',
          }
        ],
      },
      {
        path: '/author',
        icon: 'form',
        name: 'author',
        routes: [
          {
            path: '/author/list',
            name: 'list',
            component: './Author/List',
          },
          {
            path: '/author/imgList',
            name: 'imgList',
            component: './Author/ImgList',
          },
          {
            path: '/author/imgAdd',
            name: 'imgadd',
            component: './Author/Add',
          },{
            path: '/author/imgedit/:id',
            name: 'imgedit',
            hideInMenu: true,
            component: './Author/Edit',
          },
          {
            path: '/author/detail/:id',
            name: 'imgdetail',
            hideInMenu: true,
            component: './Author/Detail',
          }
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
